import java.util.*;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main2 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[] arr = new int[n];
        for(int i = 0;i<n;i++){
            arr[i] = in.nextInt();
        }
        Arrays.sort(arr);
        int count = 0;
        for(int i = 0;i<n;i++){
            if(i < n-2 && arr[i] == arr[i+1] && arr[i] == arr[i+2]){
                i += 3;
            } else if(i < n-1 && arr[i] == arr[i+1]) {
                count++;
                i += 2;
            } else{
                count += 2;
            }
        }
        System.out.println(count);
    }
}